package com.journey.org.ui.mine.collection.detail

import android.os.Bundle
import android.view.LayoutInflater
import android.view.ViewGroup
import com.journey.org.BR
import com.journey.org.R
import com.journey.org.databinding.FragmentCollectionDetailBinding
import com.mvvmhabit.org.base.BaseFragment

class CollectionDetailFragment :
    BaseFragment<FragmentCollectionDetailBinding, CollectionDetailViewModel>() {
    override fun initVariableId(): Int = BR.viewModel

    override fun initViewModel(): Class<CollectionDetailViewModel> =
        CollectionDetailViewModel::class.java

    override fun initContentView(
        inflater: LayoutInflater?,
        container: ViewGroup?,
        savedInstanceState: Bundle?
    ): Int = R.layout.fragment_collection_detail

    override fun initData() {
        super.initData()
        val id = arguments?.getString("id", "")
        mViewModel?.onCollectionIdField?.set(id)
        mViewModel?.loadCollectionDetailById()
    }

}